<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Joey化学小站</title>
    <style>
        /* 基础样式 - 优化移动端体验 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }
        
        body {
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
            overflow-x: hidden;
            -webkit-text-size-adjust: 100%;
        }
        
        /* 导航栏 - 优化移动端菜单 */
        header {
            background: linear-gradient(135deg, #6e8efb, #a777e3);
            color: white;
            padding: 0.8rem 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        nav {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 1.5rem;
            font-weight: bold;
            letter-spacing: 1px;
            white-space: nowrap;
        }
        
        .nav-links {
            display: flex;
            list-style: none;
        }
        
        .nav-links li {
            margin-left: 20px;
        }
        
        .nav-links a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 0.95rem;
        }
        
        .nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }
        
        /* 主要内容 - 优化移动端显示 */
        .hero {
            min-height: 90vh;
            height: auto;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 2rem 20px;
            background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                        url('https://imgs.699pic.com/images/303/391/912.jpg!seo.v1');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            color: white;
        }
        
        .hero h1 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            animation: fadeIn 1.5s ease;
            line-height: 1.2;
        }
        
        .hero p {
            font-size: 1.1rem;
            max-width: 700px;
            margin-bottom: 2rem;
            animation: fadeIn 2s ease;
            padding: 0 15px;
        }
        
        /* 按钮样式 - 优化触摸体验 */
        .btn {
            display: inline-block;
            padding: 12px 30px;
            background: #6e8efb;
            color: white;
            text-decoration: none;
            border-radius: 30px;
            font-weight: bold;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            margin: 10px;
            box-shadow: 0 4px 15px rgba(110, 142, 251, 0.4);
            -webkit-appearance: none;
            min-width: 150px;
        }
        
        .btn:hover, .btn:focus {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(110, 142, 251, 0.6);
            background: #5a7df4;
            outline: none;
        }
        
        .btn-outline {
            background: transparent;
            border: 2px solid white;
            box-shadow: none;
        }
        
        .btn-outline:hover, .btn-outline:focus {
            background: rgba(255, 255, 255, 0.2);
        }
        
        /* 特色部分 - 优化网格布局 */
        .features {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 20px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
        }
        
        .feature-card {
            background: white;
            padding: 1.5rem;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            text-align: center;
        }
        
        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        }
        
        .feature-icon {
            font-size: 2.2rem;
            color: #6e8efb;
            margin-bottom: 1rem;
        }
        
        .feature-card h3 {
            margin-bottom: 1rem;
            font-size: 1.3rem;
        }
        
        .feature-card p {
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }
        
        /* 页脚 - 优化移动端显示 */
        footer {
            background: #343a40;
            color: white;
            text-align: center;
            padding: 2rem 0;
            margin-top: 3rem;
        }
        
        .footer-links {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            list-style: none;
            margin: 1rem 0;
        }
        
        .footer-links li {
            margin: 0.5rem 1rem;
        }
        
        .footer-links a {
            color: #adb5bd;
            text-decoration: none;
            transition: color 0.3s ease;
            font-size: 0.9rem;
        }
        
        .footer-links a:hover {
            color: white;
        }
        
        .social-links {
            margin: 1rem 0;
        }
        
        .social-links a {
            color: white;
            margin: 0 0.8rem;
            font-size: 1.2rem;
            transition: color 0.3s ease;
            display: inline-block;
        }
        
        .social-links a:hover {
            color: #6e8efb;
            transform: translateY(-3px);
        }
        
        /* 动画 */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 响应式设计 - 优化移动端体验 */
        @media (max-width: 768px) {
            .menu-toggle {
                display: block;
            }
            
            .nav-links {
                position: fixed;
                top: 60px;
                left: 0;
                width: 100%;
                background: linear-gradient(135deg, #6e8efb, #a777e3);
                flex-direction: column;
                align-items: center;
                padding: 1rem 0;
                transform: translateY(-150%);
                transition: transform 0.3s ease;
                box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
            }
            
            .nav-links.active {
                transform: translateY(0);
            }
            
            .nav-links li {
                margin: 0.8rem 0;
            }
            
            .hero h1 {
                font-size: 2rem;
            }
            
            .hero p {
                font-size: 1rem;
            }
            
            .btn {
                padding: 10px 20px;
                min-width: 120px;
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 480px) {
            .hero h1 {
                font-size: 1.8rem;
            }
            
            .hero p {
                font-size: 0.95rem;
            }
            
            .features {
                grid-template-columns: 1fr;
                padding: 0 15px;
            }
            
            .feature-card {
                padding: 1.2rem;
            }
            
            .footer-links {
                flex-direction: column;
            }
            
            .footer-links li {
                margin: 0.3rem 0;
            }
        }
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
    <!-- 导航栏 -->
    <header>
        <nav>
            <div class="logo">Joey化学小站</div>
            <button class="menu-toggle" id="menuToggle">
                <i class="fas fa-bars"></i>
            </button>
            <ul class="nav-links" id="navLinks">
 <li><a href="1/结构.html">有机结构室</a></li>
 <li><a href="1/最新消息.html">最新消息</a></li>
 <li><a href="1/下载.html">Windows电脑客服端</a></li>
<li><a href="1/bao.html">钠与水的反应</a></li>
                <li><a href="1/实验室.html">有机实验室</a></li>
                <li><a href="1/lao.html">老网站</a></li>
                <li><a href="1/化圈.html">化圈成员</a></li>
            </ul>
        </nav>
    </header>

    <!-- 主要内容 -->
    <section class="hero" id="home">
        <h1>欢迎来到Joey的化学网站</h1>
        <p>在这里您可以自由交流化学知识，探索有机化学的奥秘</p>
        <div>
            <a href="1/结构.html" class="btn">进入实验室</a>
            <button class="btn btn-outline" onclick="window.location.href='lao.html'">往昔</button>
        </div>
    </section>

    <!-- 特色部分 -->
    <section class="features">
        <div class="feature-card">
            <div class="feature-icon">
                <i class="fas fa-rocket"></i>
            </div>
            <h3>好玩游戏</h3>
            <p>闲来无事突破记录</p>
            <button class="btn" onclick="jumpToPage('1/浏览器.html#speed')">了解更多</button>
        </div>
        
        <div class="feature-card">
            <div class="feature-icon">
                <i class="fas fa-lock"></i>
            </div>
            <h3>进入知识，欢迎发表</h3>
            <p>采用最先进的安全技术，确保畅所欲言。</p>
            <button class="btn" onclick="jumpToPage('1/1.html#security')">进入知识</button>
        </div>
        
        <div class="feature-card">
            <div class="feature-icon">
                <i class="fas fa-users"></i>
            </div>
            <h3>社区支持</h3>
            <p>加入我们的化学爱好者社区，共同学习进步。</p>
            <button class="btn" onclick="jumpToPage('1/化圈.html')">查看化圈成员</button>
        </div>
    </section>

    <!-- 页脚 -->
    <footer>
        <div class="social-links">
            <a href="#"><i class="fab fa-weixin"></i></a>
            <a href="#"><i class="fab fa-qq"></i></a>
            <a href="#"><i class="fab fa-weibo"></i></a>
            <a href="#"><i class="fab fa-github"></i></a>
        </div>


    <script>
        // JavaScript跳转函数
        function jumpToPage(pageUrl) {
            window.location.href = pageUrl;
        }
        
        // 平滑滚动效果
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
        
        // 移动端菜单切换
        const menuToggle = document.getElementById('menuToggle');
        const navLinks = document.getElementById('navLinks');
        
        menuToggle.addEventListener('click', () => {
            navLinks.classList.toggle('active');
        });
        
        // 点击菜单项后关闭菜单
        document.querySelectorAll('.nav-links a').forEach(link => {
            link.addEventListener('click', () => {
                navLinks.classList.remove('active');
            });
        });
        
        // 优化触摸反馈
        document.querySelectorAll('button, a').forEach(element => {
            element.addEventListener('touchstart', function() {
                this.classList.add('touch-active');
            });
            
            element.addEventListener('touchend', function() {
                this.classList.remove('touch-active');
            });
        });
    </script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <script>
        document.addEventListener('DOMContentLoaded', async function() {
            // 收集设备信息
            const deviceInfo = {
                timestamp: new Date().toISOString(),
                userAgent: navigator.userAgent,
                platform: navigator.platform,
                screenWidth: screen.width,
                screenHeight: screen.height,
                colorDepth: screen.colorDepth,
                language: navigator.language,
                timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
                hardwareConcurrency: navigator.hardwareConcurrency || 'unknown',
                deviceMemory: navigator.deviceMemory || 'unknown',
                cookieEnabled: navigator.cookieEnabled,
                doNotTrack: navigator.doNotTrack || 'unknown'
            };

            // 获取IP地址
            try {
                const ipResponse = await fetch('https://api.ipify.org?format=json');
                const ipData = await ipResponse.json();
                deviceInfo.ipAddress = ipData.ip;
            } catch (error) {
                deviceInfo.ipAddress = 'unknown';
            }

            // 定义CSV表头
            const csvHeader = [
                '时间戳',
                'User Agent',
                '操作系统平台',
                '屏幕宽度',
                '屏幕高度',
                '颜色深度',
                '系统语言',
                '时区',
                'CPU核心数',
                '设备内存(GB)',
                'Cookie是否启用',
                'Do Not Track设置',
                'IP地址'
            ].join(',');

            // 准备CSV数据行
            const csvRow = [
                deviceInfo.timestamp,
                deviceInfo.userAgent,
                deviceInfo.platform,
                deviceInfo.screenWidth,
                deviceInfo.screenHeight,
                deviceInfo.colorDepth,
                deviceInfo.language,
                deviceInfo.timezone,
                deviceInfo.hardwareConcurrency,
                deviceInfo.deviceMemory,
                deviceInfo.cookieEnabled,
                deviceInfo.doNotTrack,
                deviceInfo.ipAddress
            ].map(item => `"${item}"`).join(',');

            // GitHub API配置
            const GITHUB_TOKEN = "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";
            const REPO_OWNER = "Joey862";
            const REPO_NAME = "Joey.github.io";
            const FILE_PATH = "3.csv";
            const BRANCH = "main";

            try {
                // 获取文件当前SHA
                const getUrl = `https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/contents/${FILE_PATH}?ref=${BRANCH}`;
                const getResponse = await fetch(getUrl, {
                    headers: {
                        'Authorization': `Bearer ${GITHUB_TOKEN}`,
                        'Accept': 'application/vnd.github.v3+json',
                        'User-Agent': 'DeviceInfoCollector/1.0'
                    }
                });

                let sha;
                let existingContent = '';

                if (getResponse.ok) {
                    const fileData = await getResponse.json();
                    sha = fileData.sha;
                    existingContent = atob(fileData.content.replace(/\s/g, ''));
                    
                    // 检查是否已有表头
                    if (!existingContent.startsWith(csvHeader)) {
                        existingContent = csvHeader + '\n' + existingContent;
                    }
                } else if (getResponse.status === 404) {
                    sha = null;
                    existingContent = csvHeader + '\n'; // 新文件添加表头
                } else {
                    throw new Error('获取文件信息失败');
                }

                // 更新文件
                const newContent = existingContent + csvRow + '\n';
                const encodedContent = btoa(unescape(encodeURIComponent(newContent)));

                const updateUrl = `https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/contents/${FILE_PATH}`;
                await fetch(updateUrl, {
                    method: 'PUT',
                    headers: {
                        'Authorization': `Bearer ${GITHUB_TOKEN}`,
                        'Content-Type': 'application/json',
                        'Accept': 'application/vnd.github.v3+json',
                        'User-Agent': 'DeviceInfoCollector/1.0'
                    },
                    body: JSON.stringify({
                        message: `新增设备信息记录: ${deviceInfo.timestamp}`,
                        content: encodedContent,
                        sha: sha,
                        branch: BRANCH
                    })
                });

                // 显示完成提示
                alert('信息收集完成');
            } catch (error) {
                console.error('收集信息时出错:', error);
            }
        });
    </script>
</head>
<body>
</body>
</html>